﻿<Window x:Class="nhanvien.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded" >
    <Grid>

        <Grid.RowDefinitions>

            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
        </Grid.RowDefinitions>

        <Grid Grid.Row="1" Margin="10,15,10,15">
            <Grid.RowDefinitions>
                <RowDefinition Height="30"></RowDefinition>
                <RowDefinition Height="30"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto" MinWidth="100"></ColumnDefinition>
                <ColumnDefinition Width="auto" MinWidth="150"></ColumnDefinition>
                <ColumnDefinition Width="auto" MinWidth="100"></ColumnDefinition>
                <ColumnDefinition Width="24"></ColumnDefinition>
                <ColumnDefinition Width="129" />
                <ColumnDefinition Width="250" MinWidth="150"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Label Content="Mã nhân viên"  HorizontalAlignment="Left" Margin="6,2,0,0" VerticalAlignment="Top" Width="87" Height="26"/>
            <Label Content="Ngày sinh" Grid.Row="1" HorizontalAlignment="Left" Margin="6,2,0,0" VerticalAlignment="Top" Height="26" Width="86"/>
            <Label Content="Tên nhân viên" HorizontalAlignment="Left"  Grid.Column="1" Margin="114,3,0,1" Width="84" Grid.ColumnSpan="2" />
            <Label Content="Đơn vị" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" Margin="114,1,0,0" VerticalAlignment="Top" Height="26" Width="75" Grid.ColumnSpan="2" />
            <TextBox Name="txtmanv"  HorizontalAlignment="Left" Height="25" Margin="4,3,0,0" Grid.Column="1" TextWrapping="Wrap"  VerticalAlignment="Top" Width="104"/>
            <TextBox Name="txtngaysinh" HorizontalAlignment="Left" Height="23" Margin="4,3,0,0" Grid.Row="1" Grid.Column="1" TextWrapping="Wrap"  VerticalAlignment="Top" Width="104"/>
            <TextBox Name="txttennv" HorizontalAlignment="Left" Height="23" Margin="54,3,0,0" Grid.Column="2" TextWrapping="Wrap"  VerticalAlignment="Top" Width="160" Grid.ColumnSpan="3" />
            <TextBox Name="txtdonvi" HorizontalAlignment="Left" Height="23" Margin="54,3,0,0" Grid.Row="1" Grid.Column="2" TextWrapping="Wrap"  VerticalAlignment="Top" Width="87" Grid.ColumnSpan="3" />


        </Grid>
        <DataGrid Name="datagrid" Grid.Row="2" AutoGenerateColumns= "False">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Mã Nhân Viên" Width="120" Binding="{Binding manv}"></DataGridTextColumn>
                <DataGridTextColumn Header="Tên Nhân Viên" Width="140" Binding="{Binding tennv}"></DataGridTextColumn>
                <DataGridTextColumn Header="Ngày Sinh" Width="140" Binding="{Binding ngaysinh}"></DataGridTextColumn>
                <DataGridTextColumn Header="Đơn Vị" Width="150" Binding="{Binding donvi}"></DataGridTextColumn>
            </DataGrid.Columns>

        </DataGrid>


        <Button  Content="Thêm" Click="btnthem_Click" Grid.Row="3" Height="23"  Margin="148,4,296,0" Name="btnthem" VerticalAlignment="Top" Width="59" />
        <Button  Content="Ghi" Click="btnghi_Click" Grid.Row="3" Height="23"  Margin="231,4,206,0" Name="btnghi" VerticalAlignment="Top" Width="66" />
        <Button  Content="Xóa" Click="btnxoa_Click" Grid.Row="3" Height="23"  Margin="320,3,116,0" Name="btnxoa" VerticalAlignment="Top" Width="67" />
        <Button  Content="Thoát" Click="btnthoat_Click" Grid.Row="3" Height="23" Margin="405,3,34,0" Name="btnthoat" VerticalAlignment="Top" Width="64" />
        <Label Content="nhân viên" HorizontalAlignment="Left" Margin="15,12,0,0" VerticalAlignment="Top" Width="87" Height="26" Grid.RowSpan="2" />
    </Grid>
</Window>
